package com.cms.biz.rsf;

public class SQLString {
	
	public static final String ADD_RSF = "insert into cms_rsf(id,folder_id,category_id,special_id,title,title_color,author,source,count,istop,isimg,img_name,ispassd,keywords,sub_category_id,create_date,create_user)values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
	public static final String UPDATE_RSF = "update cms_rsf set folder_id=?,sub_category_id=?,special_id=?,title=?,title_color=?,author=?,source=?,istop=?,isimg=?,img_name=?,ispassd=?,keywords=? where id =?";
    public static final String DELETE_RSF = " update cms_rsf set folder_id = 1 where id = ? ";
	public static final String GET_RSF_BY_ID = "select * from cms_rsf where id = ? ";
	public static final String GET_RSF_ALL = "select r.*,c.category_name from cms_rsf r,cms_category c where r.sub_category_id = c.id and r.folder_id= ? and r.category_id = ? ";
    public static final String GET_RSF_ALL_COUNT = "select count(1) from cms_rsf r where r.folder_id= ? and r.category_id = ? ";
    public static final String GET_RSF_BY_USER = "select r.*,c.category_name from cms_rsf r,cms_category c where r.sub_category_id = c.id and r.folder_id= ? and r.category_id = ? and r.create_user = ? ";
    public static final String GET_RSF_BY_USER_COUNT = "select count(1) from cms_rsf r where r.folder_id= ? and r.category_id = ? and r.create_user = ? ";
    public static final String ADD_RSF_ATTACHMENT = "insert into cms_rsf_attachment (id,parent_id,suffix,file_name,create_user)values(?,?,?,?,?) ";
    public static final String DELETE_RSF_ATTACHMENT = "delete from cms_rsf_attachment where id =? ";
}
